using System.Collections.Generic;

namespace Box {
    public enum ProcessTreeNodePortType {
        Input,
        Output,
    }

    public class ProcessNodePort {
        public string Name;
        public ProcessTreeNodePortType Type;
        public ProcessNode Node;
        public ProcessNodePort Parent;
        public Dictionary<ProcessNodePort,ProcessNodePort> Children = new Dictionary<ProcessNodePort, ProcessNodePort>();
    
        public void AddChild(ProcessNodePort port) {
            port.Parent = this;
            Children[port] = port;
        }

        public void RemoveChild(ProcessNodePort port) {
            port.Parent = null;
            Children.Remove(port);
        }
    }
}